import java.util.*;
public class PureNumber {
    public static void main(String[] args)
    {
        Scanner buf;
        int num,i,j,k=1;
        boolean flag=false;
        buf=new Scanner(System.in);
        System.out.println("请输入一个大于1的正整数n");
        num=buf.nextInt();
        for(i=1;i<=num;i++)
        {
            for(j=2;j<i;j++)
            {
                k=i%j;
                if(k==0)
                {
                    flag=true;
                    break;
                }
            }
            if(flag==false)
            {
                System.out.print(i+"\t");
            }
            flag=false;
        }
    }
}